/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pkg2103137032_v;

/**
 *
 * @author novaldebbyp
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int nilai[][] = new int[3][4];
        nilai[0] = new int[]{81, 50, 89, 77};
        nilai[1] = new int[]{90, 83, 55, 70};
        nilai[2] = new int[]{62, 87, 65, 92};
        System.out.println("NRP | Rata-rata ");
        System.out.println("----------------");
        for(int i=0; i<4; i++){
            int total = 0;
            for(int j=0; j<3; j++){
                total+=nilai[j][i];
            }
            float r = total/3;
            System.out.println((i) + "   | " + r);
        }
        System.out.println("----------------");
    }
}
